Flu[X]'s Pascal Functions for crackers..
Version 1.2
Date: 5/15/99


Have you ever wanted to make a keygen.. but didnt have
a way to convert your results to Hexidecimal in pascal?
This little unit will help you do that..

Below are a list of functions included in this unit..
=====================================================

Hex2Dec          - Converts a Hex String to a Decimal Number
DecSrting2DecInt - Converts a Decimal String to a LongInt
Dec2Hex          - Converts Deciman number to Hexidecimal
UpCase2LowCase   - Converts a mixed or all uppercase string to
                   all lowercase
LowCase2UpCase   - Converts a mixed or all lowercase string to
                   an uppercase one
SumString        - Adds all the ascii values of a string up
ProductString    - Multiplies all the ascii values of a string


how to use it..
================

follow these steps..

1) copy Ctools.tpu to your pascal\units directory
2) in your source code add this line to the TOP of your program
   without the quotes
    "uses ctools;"
3) write your program like normal... and use the funtions
   like a normal pascal function


LowCase2UpCase  AND  UpCase2LowCase  Functions
==============================================

now.. these functions all return strings..
so declare a string variable that can hold the result..

for example say you wanted to convert the variable neame to all uppercase
lets assume:  name := 'jaZey jEFf and SoN';

to convert it to uppercase you would type in
name:=LowCase2UpCase(name);

then the variable name would be capitalized.. nice eh?

The UpCase2LowCase function works in the same way.. jsut opposite..

Dec2Hex Function
================

How to use the Decimal to Hex converting function

this function returns the result in a string
so declare a string variable that can hold the result..

This function takes a variable or a constand at an longinteger parameter

if you had the variable "newnumber" declared as a string
and if "variabletoconvert" was holding a number you could 
convert it to a hex string for printing...

you could type:
newnumber:=Dec2Hex(variabletoconvert);

and newnumber would hold the hex string for further use...


now you are probably saying.. what if i jsut want to do all
my calculations in Decimal and convert to hex before i print
it out (i usually do this cuz' its easier). simple.. jsut do this


writeln(Dec2Hex(VarToConvert));


it's that simple :)

Hex2Dec Function
================
How to use the Hex to Decimal converting function

this function returns the result in a longint
so declare a longint variable that can hold the result..

This function takes a variable or a constand as an String parameter

for example, if you had a hex string in the variable: H
and you  wanted to get the decimal to a Long int VAriable called: I
you could type:

I:=Hex2Dec(H);


and I would hold the Number in decimal.

If you wanted to print the result to the screen you could type:

writeln(Hex2Dec(H));

DecString2DecInt Function
=========================

How to use the DEcimal string to Decimal Integer converting function

this function returns the result in a longint
so declare a longint variable that can hold the result..

This function takes a variable or a constand as an String parameter

for example, if you had a Decimal string in the variable: H
and you  wanted to get the decimal to a Long int VAriable called: I
you could type:

I:=DecString2DecInt(H);


and I would hold the Number in decimal.
Why would you need this function? simple..so you can
use the values of a string to make a keygen if necessary.

SumString Function
===================

This function returns an integer.. It just adds up all
the ascii values of the string into one number.
to use simply put..

Integer_variable:=Sumstring(StringVariableToTotal);

the result will be stored in the Integer_variable. that should
be pretty explanatory..

ProductString Function
=======================
This function returns an longint..
It just multiplies all the ascii values together and returns that value
to use simply put..

longint_variable:=ProductString(StringVariableToMultiply);

the result will be stored in the longint_variable. that should
be pretty explanatory..

For Tech Infos
==============

Here is how the functions are declared for your info if it may help you..

function Dec2Hex(eax:longint) : string;
function DecString2DecInt(eax:string) : longint;
function Hex2Dec(eax:string) : longint;
function LowCase2UpCase(S: string):string;
function UpCase2LowCase(S: string):string;
function SumString(S: string):integer;
function ProductString(S: string):longint;

Closing Remarks
===============

If you found this useful or have any comments or questions
please contact me.  I am always open for comments or concerns.
If you would like to see something added.. also feel free to contact
me via e-mail.  I hope you enjoy this product :)

Flu[X]/99